home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
science
/
sm32a.zip
/
LIBRARY
/
GCD.LI
< prev
next >
Wrap
Text File
|
1993-10-16
|
141b
|
5 lines
# gcd(a,b) gives the greatest common dividor of a and b
# e.g. gcd(9,6) gives 3
gcd(a_, b_) := if(mod(a,b) == 0, b, gcd(b, mod(a,b)) )